<template>
  <div id="iFooter" class="unSelect">
    <span>@</span>
    <span>{{ time.start }}</span>
    <span v-if="timeEndShow"> - {{ time.end }}</span>&nbsp;
    <span><a href="https://www.celiangyuan.com/" target="_blank">河南冰测科技有限公司</a></span>&nbsp;
    <span><a href="https://beian.miit.gov.cn/" target="_blank">豫ICP备123456789-0号</a></span>
  </div>
</template>

<script>
import { format } from '../plugins/moment'
export default {
  name: 'iFooter',
  data() {
    return {
      time: {
        start: '2021',
        end: ''
      },
      timeEndShow: true
    }
  },
  methods: {
    init() {
      this.formatDate()
    },
    formatDate() {
      this.time.end = format('YYYY')
      if (this.time.start === this.time.end) {
        this.timeEndShow = false
      }
    }
  },
  mounted() {
    this.init()
  }
}
</script>

<style lang="scss" scoped>
#iFooter {
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ccc !important;
  text-shadow: 0 3px 3px rgba(0,0,0,0.3);

  span{
    font-size: 0.875rem;
  }

  a {
    color: inherit;
  }
}
</style>
